﻿using System;
using System.Net;
using System.Web.Script.Serialization;

class Functions
{
    public static string GetFBProfileID(string ProfileName)
    {
        string address = URLs.FBGraph + ProfileName;
        string input = new WebClient().DownloadString(address);
        JavaScriptSerializer serializer = new JavaScriptSerializer();
        serializer.RegisterConverters(new DynamicJsonConverter[] { new DynamicJsonConverter() });
        dynamic obj2 = serializer.Deserialize(input, typeof(object));
        return (string) obj2.id;
    }
}

class URLs
{
    public static string FBFQL = "https://api.facebook.com/method/fql.query?query=";
    public static string FBGraph = "https://graph.facebook.com/";
    public static string FeedsURL = "http://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=";
    public static string TwitterURL = "http://api.twitter.com/1/users/show.xml?screen_name=";
    public static string DeliciousURL = "http://feeds.delicious.com/v2/json/urlinfo/data?url=";
    public static string LinkedInURL = "http://www.linkedin.com/countserv/count/share?url=";
    public static string DiggSrvURL = "http://services.digg.com/2.0/story.getInfo?links=";
}